import request from '@/utils/request'

export function getModelList(query) {
  return request({
    url: '/roles',
    method: 'get'
  })
}

export function addModel(data) {
  return request({
    url: '/role',
    method: 'post',
    data
  })
}

export function updateModel(id, data) {
  return request({
    url: `/role/${id}`,
    method: 'put',
    data
  })
}

export function deleteModel(id) {
  return request({
    url: `/role/${id}`,
    method: 'delete'
  })
}
